import { resolve } from 'path'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import react from '@vitejs/plugin-react'
import UnoCSS from 'unocss/vite'

export default defineConfig({
  main: {
    plugins: [externalizeDepsPlugin()]
  },
  preload: {
    plugins: [externalizeDepsPlugin()]
  },
  renderer: {
    resolve: {
      // alias: {
      //   '@': resolve('src/renderer/src')
      // }
      alias: [{ find: '@', replacement: resolve('src/renderer/src') }]
    },
    plugins: [UnoCSS(), react()]
  }
})
